package com.smart.seckilldemo.commons.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.smart.seckilldemo.pojo.Good;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 秒杀商品详情
 *
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SeckillGoodsVo {

    /**
     * 秒杀商品ID
     */
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    /**
     * 商品ID
     */
    @TableField(value = "goods_id")
    private Long goodsId;

    /**
     * 秒杀价
     */
    @TableField(value = "seckill_price")
    private BigDecimal seckillPrice;

    /**
     * 库存数量
     */
    @TableField(value = "stock_count")
    private Integer stockCount;

    /**
     * 秒杀开始时间
     */
    @TableField(value = "start_date")
    private Date startDate;

    /**
     * 秒杀结束时间
     */
    @TableField(value = "end_date")
    private Date endDate;

    /**
     * 限制用户购买数量
     */
    @TableField(value = "peer_limit")
    private int peerLimit;

    //商品信息
    private Good good;

}
